package com.team11.server.controller.admin;

import com.team11.server.service.admin.Admin_DeleteS_Service;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@Api(tags = "管理员接口")
public class Admin_DeleteS_Controller {
    @Autowired
    private Admin_DeleteS_Service admin_deleteS_service;
    @ApiOperation("批量删除学生接口(需要学号)")
    @PostMapping("/DeleteS")
    public String deleteS(@RequestParam(value = "sNumbers" ,required=false)List<String> sNumbers){
        for (String sNumber:sNumbers){
            admin_deleteS_service.deleteS(sNumber);
        }
        return "执行成功";
    }

}
